package com.demo.clazz;

public class Instrument {
    public void play(){}
    static void tune(Instrument i){i.play();}
}
class Mind extends Instrument{
    public static void main(String[] args) {
        Mind mind = new Mind();
        Instrument.tune(mind);
    }
}


class SelfCounter {
    private static int counter;
    private int id=counter++;

    public String toString(){
        return "SelfCounter: "+id;
    }
}
class WithFinalFields {
    static final SelfCounter wffs=new SelfCounter();
    final SelfCounter wff=new SelfCounter();

    public String toString(){
        return "wff= "+wff+",\n wffs= "+wffs;
    }
}
class StaticFinal {
    public static void main(String[] args) {
        System.out.println("First Object:");
        System.out.println(new WithFinalFields());
        System.out.println("Second Object:");
        System.out.println(new WithFinalFields());
    }
}